Attributes

It is possible to define a set of entities and the relationships among them in a number of different ways. The main difference is how we deal with attributes.

Consider the diagram to the right. It shows the entity set "Employee" with attributes "employee-name" and "phone-number".

We could argue that the phone be treated as an entity itself, with attributes "phone-number" and "location". Then we have two entity sets, and the relationship "EmpPhn" defining the association between employees and their phones.

Create an entity set named "Phone" with attribute "location". Connect attribute "phone-number" with "Phone". Create a relationship set named "EmpPhn". Connect it with the two entity sets.

  1. Select the "Entity Set" tool.Click into an empty area in the diagram. Double click at the name of the created entity set to edit it. Enter the name "Phone".
  2. Create a new attribute named "location" using the "Attribute" tool. Proceed as described in step 1.
  3. Use the "Connection" tool to connect the attribute "location" with the entity set "Phone".
  4. Delete the connection between "phone-number" and "Employee". Create e new connection between "phone-number" and "Phone" using the "Connection" tool.
  5. Select the "Relationship Set" tool. Click into an empty area on the diagram. Double click at the name of the created relationship set to edit it. enter the name "EmpPhn".
  6. Use the "Connection" tool twice to connect "EmpPhn" with "Employee" and with "Phone".

Click at "Compare with Solution" to see whether your diagram is correct, and to get a description of the solution.


Source: http://www.cs.sfu.ca/CC/354/zaiane/material/notes/Chapter2/node4.html

DLOB M2: Conceptual Data Modelling